<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Lily后台</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/static/css/admin.css" media="all">
  <script type="text/javascript" src="/static/js/jquery-2.1.4.min.js"></script>
  <style>
    /*分页*/
    .pagination{height: 32px;}
    .pagination li { float: left;width:30px;height:30px;line-height: 30px;border-top:1px solid #e2e2e2;border-left:1px solid #e2e2e2;border-bottom:1px solid #e2e2e2;text-align:center;cursor:pointer; }
    .pagination li a{width:100%;height:100%;display:inline-block;}
    .pagination li:last-child{border-right:1px solid #e2e2e2}
    .pagination .disabled{color:#e2e2e2}
    .pagination .active{background:#009688;color:#ffffff;height:32px;margin-top:-1px;line-height:32px}
  </style>
  <?php
   $power=Db::connect('publicdata')->table('lily_admin')->field('power')->where([['status','=',1],['username','=',Session::get('username')]])->find();
   $power=$power['power'];
  ?>
</head>
<body class="layui-layout-body">
  
  <div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
      <div class="layui-header">
        <!-- 头部区域 -->
        <ul class="layui-nav layui-layout-left">
         
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a href="https://www.lily-bearing.com" target="_blank" title="前台">
              <i class="layui-icon layui-icon-website"></i>
            </a>
          </li>

        </ul>
        <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
          
          <li class="layui-nav-item" style='margin-right: 20px'>
            <a href="javascript:;">
              <cite>{$Think.session.username}</cite>
            </a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;" onclick="change_pwd_alert()">修改密码</a></dd>
              <hr>
              <dd layadmin-event="logout" style="text-align: center;" onclick="out()"><a href="javascript:;">退出</a></dd>
            </dl>
          </li>
        </ul>
      </div>
      <!-- 侧边菜单 -->
      <div class="layui-side layui-side-menu">
        <div class="layui-side-scroll">
          <div class="layui-logo">
            <span>Lily</span>
          </div>
          
          <ul class="layui-nav layui-nav-tree">
            <li class="layui-nav-item {eq name='first' value='console'}layui-nav-itemed{/eq}" data-name='console'>
              <a href="javascript:;" lay-tips="主页">
                <i class="layui-icon layui-icon-home"></i>
                <cite>主页</cite>
              </a>
              <dl class="layui-nav-child">
                <dd>
                  <a href="javascript:;" {eq name='second' value='index'}class='layui-this'{/eq} data-name='index' onclick="leftnav('console-index','/admin/index/home.html')">控制台</a>
                </dd>
              </dl>
              <?php if(strpos($power,',1,') !== false){ ?>
              <dl class="layui-nav-child">
                <dd>
                  <a href="javascript:;" {eq name='second' value='user'}class='layui-this'{/eq} data-name='user' onclick="leftnav('console-user','/admin/index/user.html')">账户列表</a>
                </dd>
              </dl>
              <?php } ?>
            </li>
            <?php if(strpos($power,',2,') !== false){ ?>
             <li class="layui-nav-item {eq name='first' value='blog'}layui-nav-itemed{/eq}" data-name='blog'>
              <a href="javascript:;" lay-tips="博客">
                <i class="layui-icon layui-icon-picture-fine"></i>
                <cite>博客</cite>
              </a>
              <dl class="layui-nav-child">
                <dd>
                  <a href="javascript:;" data-name='bloglist' {eq name='second' value='bloglist'}class='layui-this'{/eq} onclick="leftnav('blog-bloglist','/admin/blog/index.html')">博客</a>
                </dd>
                <dd>
                  <a href="javascript:;" data-name='blogclasslist' {eq name='second' value='blogclasslist'}class='layui-this'{/eq} onclick="leftnav('blog-blogclasslist','/admin/blogclass/index.html')">分类</a>
                </dd>
              </dl>

            </li>
            <?php } ?>
            <?php if(strpos($power,',3,') !== false){ ?>
            <li class="layui-nav-item {eq name='first' value='events'}layui-nav-itemed{/eq}" data-name='events'>
              <a href="javascript:;" lay-tips="新闻事件">
                <i class="layui-icon layui-icon-file-b"></i>
                <cite>新闻事件</cite>
              </a>
              <dl class="layui-nav-child">
                <dd>
                  <a href="javascript:;" data-name='eventslist' {eq name='second' value='eventslist'}class='layui-this'{/eq} onclick="leftnav('events-eventslist','/admin/events/index.html')">新闻事件</a>
                </dd>
                <dd>
                  <a href="javascript:;" data-name='eventsclasslist' {eq name='second' value='eventsclasslist'}class='layui-this'{/eq} onclick="leftnav('events-eventsclasslist','/admin/eventsclass/index.html')">分类</a>
                </dd>
              </dl>

            </li>
            <?php } ?>
            <?php if(strpos($power,',4,') !== false){ ?>
            <li class="layui-nav-item {eq name='first' value='set'}layui-nav-itemed{/eq}" data-name='set'>
              <a href="javascript:;" lay-tips="其他">
                <i class="layui-icon layui-icon-set"></i>
                <cite>其他</cite>
              </a>
              <dl class="layui-nav-child">
                  <?php if(strpos($power,',4.1,') !== false){ ?>
                <dd class="layui-nav-itemed">
                  <a href="javascript:;">询问表单</a>
                  <dl class="layui-nav-child">
                    <dd>
                      <a href="javascript:;" data-name='enquire' {eq name='second' value='enquire'}class='layui-this'{/eq} onclick="leftnav('set-enquire','/admin/enquire/index.html')">列表</a></dd>
                  </dl>
                </dd>
                 <?php } ?>
                <?php if(strpos($power,',4.2,') !== false){ ?>
                <dd class="layui-nav-itemed">
                  <a href="javascript:;">订阅邮箱</a>
                  <dl class="layui-nav-child">
                    <dd>
                      <a href="javascript:;" data-name='subscribe' {eq name='second' value='subscribe'}class='layui-this'{/eq} onclick="leftnav('set-subscribe','/admin/subscribe/index.html')">列表</a></dd>
                  </dl>
                </dd>
                <?php } ?>
                
                <?php if(strpos($power,',4.3,') !== false){ ?>
                <dd class="layui-nav-itemed">
                  <a href="javascript:;">搜索信息</a>
                  <dl class="layui-nav-child">
                    <dd><a href="javascript:;" data-name='search' {eq name='second' value='search'}class='layui-this'{/eq} onclick="leftnav('set-search','/admin/searchcount/index.html')">搜索词</a></dd>
                    <dd><a href="javascript:;" data-name='searchc' {eq name='second' value='searchc'}class='layui-this'{/eq} onclick="leftnav('set-searchc','/admin/searchc/index.html')">国家</a></dd>
                    <dd><a href="javascript:;" data-name='searchall' {eq name='second' value='searchall'}class='layui-this'{/eq} onclick="leftnav('set-searchall','/admin/searchcount/all_search.html')">总数据</a></dd>
                  </dl>
                </dd>
                 <?php } ?>
              </dl>
            </li>
             <?php } ?>

             <?php if(strpos($power,',5,') !== false){ ?>
            <li class="layui-nav-item {eq name='first' value='classify'}layui-nav-itemed{/eq}">
              <a href="javascript:;" lay-tips="产品">
                <i class="layui-icon layui-icon-app"></i>
                <cite>产品</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a href="javascript:;" {eq name='second' value='classifylist'}class='layui-this'{/eq} onclick="leftnav('classify-classifylist','/admin/classify/index.html')">分类列表</a></dd>
              </dl>
            </li>
             <?php } ?>

             <?php if(strpos($power,',6,') !== false){ ?>
            <li class="layui-nav-item {eq name='first' value='redirect'}layui-nav-itemed{/eq}">
              <a href="javascript:;" lay-tips="301">
                <i class="layui-icon layui-icon-cols"></i>
                <cite>301</cite>
              </a>
              <dl class="layui-nav-child">
                <dd><a href="javascript:;" {eq name='second' value='redirectlist'}class='layui-this'{/eq} onclick="leftnav('redirect-redirectlist','/admin/redirect/index.html')">301列表</a></dd>
              </dl>
            </li>
             <?php } ?>
          
          </ul>
        </div>
      </div>
      <!-- 主体内容 -->
      <div class="layui-body" id="LAY_app_body" style="margin-top:-40px">
        <div class="layadmin-tabsbody-item layui-show" style='padding: 20px;overflow-y:auto'>